package com.lagou.edu.mvcframework.Interceptor;

import com.lagou.edu.mvcframework.pojo.Handler;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Handler拦截器
 */
public interface HandlerInterceptor {

    /**
     * 前置处理
     *
     * @param req
     * @param resp
     * @param handler
     * @return
     */
    boolean preHandle(HttpServletRequest req, HttpServletResponse resp, Handler handler);

    /**
     * 后置处理
     *
     * @param req
     * @param resp
     * @param handler
     * @return
     */
    void postHandle(HttpServletRequest req, HttpServletResponse resp, Handler handler);

}
